<?php
namespace app\api\controller;

use app\BaseController;
use think\facade\Request;
class Token extends BaseController{
    //同步
    public static function getToken(){
        
        $str = Request::param('token');
        if(empty($str)){
            return false;
        }

        $file_name ="/usr/local/nginx/html/order_assistant/public/uploads/taobao/accessToken.txt";
        $file_pointer = fopen($file_name,"w");
        fwrite($file_pointer,$str);
        fclose($file_pointer);
    }

}